package com.hk.housekeeping.order.utils;

import com.hk.housekeeping.order.entity.Order;

import java.sql.ResultSet;
import java.sql.SQLException;

//订单对象的封装工具类
public class OrderUtils {
    public static Order getOrderBySelect(ResultSet rs) throws SQLException {
        Order order = new Order();
        order.setSid(rs.getString("sid"));
        order.setClientName(rs.getString("client_name"));
        order.setClientPhone(rs.getString("client_phone"));
        order.setOrderState(rs.getInt("order_state"));
        order.setCreateTime(rs.getDate("create_time"));
        order.setIsDelete(rs.getInt("is_delete"));
        return order;
    }
}
